home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_cyn_snakedelay.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  81 lines

  1. # Jones 3D Cog Script
  2. #
  3. # cyn_snakedelay.cog
  4. #
  5. # This cog will cause a snake to attack upon the players' entry onto a specified face
  6. #
  7. # [CM]
  8. #
  9. # (C) 1997 LucasArts Entertainment Co. All Rights Reserved
  10. # ========================================================================================
  11.  
  12. symbols
  13.  
  14. #.......................... MESSAGES .....................
  15.     message        startup
  16.     message        entered
  17.     message        killed
  18.  
  19. #.......................... ACTORS .....................
  20.     thing        snake
  21.     thing        player                                local
  22.  
  23. #.......................... ACTOR MARKS .....................
  24.  
  25. #.......................... TRIGGERS .....................
  26.     surface        triggersurf
  27.  
  28. #.......................... SOUNDS .....................
  29.     sound        strike=fol_sn_hiss.wav                local
  30.  
  31. #.......................... VARIABLES .....................
  32.     int            attacked=0                            local
  33.     int            i_deadsnake=0                        local
  34.  
  35. end
  36. # ========================================================================================
  37. code
  38.  
  39. startup:
  40.  
  41.     player=GetLocalPlayerThing();
  42.     AISetCutsceneMode(snake);
  43.  
  44.     return;
  45.  
  46. # ========================================================================================
  47. entered:
  48.  
  49.     if (GetSenderRef() != triggersurf) return;
  50.     if (GetSourceRef() != player) return;
  51.     if (attacked == 1) return;
  52.     if (i_deadsnake == 1) return;
  53.  
  54.     attacked = 1;
  55.     PlaySoundThing(strike, snake, 1, 6, 12, 0x0);
  56.     Sleep(1.0);
  57.     AIClearCutSceneMode(snake);
  58.     AISetFireTarget(snake, player);
  59.  
  60.     return;
  61.  
  62. # ========================================================================================
  63. killed:
  64.  
  65. If(GetSenderRef() == snake)
  66.     {
  67.     i_deadsnake=1;
  68.     }
  69. return;
  70. # ========================================================================================
  71.  
  72.     
  73.     
  74. end
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.